package com.ruoyi.api.controller;

import com.ruoyi.api.service.IFileService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * 【请填写功能名称】Controller
 *
 * @author 寻你
 * @date 2025-05-28
 */
@RestController
@RequestMapping("/file")
public class FileController extends BaseController {

    @Autowired
    private IFileService iFileService;

    /**
     * 文件上传接口(minio)
     */
    @PostMapping("/minio/upload")
    public AjaxResult uploadFile(MultipartFile file) {
        return AjaxResult.success(iFileService.minioUploadFile(file));
    }


}
